#include "Buffer.hpp"

Buffer &Buffer::operator=(const Buffer &other)
{
  Buf = other.GetBuffer();
  BufferSize = other.GetBufferSize();
  AlreadyRead = other.GetAlreadyRead();
  return *this;
}

Buffer::Buffer(const Buffer &other)
{
  *this = other;
}

Buffer::Buffer(char	*buf,
	       int	bufferSize,
	       int	alreadyRead)
  : Buf(buf),
    BufferSize(bufferSize),
    AlreadyRead(alreadyRead)
{
}

Buffer::~Buffer()
{

}

void		Buffer::SetBufferSize(int	bufferSize)
{
  BufferSize = bufferSize;
}

int		Buffer::GetBufferSize(void) const
{
  return BufferSize;
}

void		Buffer::SetBuffer(char		*buf)
{
  Buf = buf;
}

char		*Buffer::GetBuffer(void) const
{
  return Buf;
}

void          Buffer::SetAlreadyRead(int	alreadyRead)
{
  AlreadyRead = alreadyRead;
}

int           Buffer::GetAlreadyRead(void) const
{
  return AlreadyRead;
}
